<template>
  <div class="wrapper">
    <div class="item" v-for="(item, index) in category" :key="index" :style="{ backgroundColor: item.bg_color }">
      <p class="font-12" :style="{ color: item.font_color }">{{item.category_name}}</p>
      <img class="product-img" :src="item.image" alt="">
    </div>
  </div>
</template>

<script>
export default {
  name: 'DetailCategory',
  props: {
    category: Array
  }
}
</script>

<style lang="stylus" scoped>
  .wrapper
    display flex
    flex-direction row
    flex-wrap wrap
    justify-content space-between
    margin-bottom 1rem
    .item
      width 50%
      display flex
      flex-direction column
      align-items center
      .font-12
        line-height 1.5rem
      .product-img
        width 80%
</style>
